How the non-deterministic AHS-RNG works

While the deterministic AHS-RNG generates the true random numbers with a specific program from the initial parameters, comparable to reading out stored physical random numbers, the non-deterministic AHS-RNG uses a physical random component. A physical random event does not always have to be a radioactive decay process; time is also a physical parameter that can be used advantageously in a Linux operating system. The biggest advantage is of course the fact that this physical random generator is free of charge and available with a few lines of C code.

Anyone who has worked with applications under a Linux operating system, probably on a NUMA (Non-Uniform Memory Architecture) machine with L1, L2 and L3 caches and fewer memory channels than processor cores, knows that the execution time of identical jobs can sometimes vary greatly, which can easily be shown by using the time command. While the time command works only with milliseconds, it is possible to query the time in nanoseconds. However, one restriction must be made: The random numbers determined with the physically help of the run of the time are not statistically correct random numbers. Fortunately, this is not necessary, the values need only to be roughly different. With these values used as a timer, "one progression event" (FBM3 to FBM4, FBM2 to FBM3, FBM1 to FBM2 and a new FBM1) of the sequence control after 32 bits (or after 64 bits in the parallel version) is randomly replaced by "two progression events", always one after each 16 bits. In addition, the increment value of the LCG is increased by 2, which causes an additional change in the sequence.

The easiest way to generate a random value for this timer is to calculate the result of the nanosecond-query modulo 997, and to add a constant of 313. The latter to ensure that a minimum number of cycles is calculated before the next "two progression events" occurs. The random value calculated in this way is simply counted down after each 32-bit generation cycle. At the end of the timer countdown a new "two progression events" cycle is executed, and a new calculation of the timer random value, with the help of the nanosecond clock. If we use the same parameters of the AHS-RNG to generate a large to very large number of non-deterministic random number series, we need to run the generator in a "warm up" phase of 2 million cycles to get the registers into individually different states. With different parameters per AHS-RNG instance, the "warm up" is also recommended if we want completely different random numbers right from the start. The "warm up" takes about 1/5 of a second.

This is how the non-deterministic AHS-RNG works in "secret" mode. This means that nobody can recalculate the random numbers generated, even if he knows the parameter tables used. According to the first tests, the true random numbers generated in this way are superior to those generated with physical RNG. A further advantage is described in the article on the four different Families of AHS-RNG.

The use of the internal time data as supplementary entropy was first described in our white paper from 2006 (p. 25) in the Glossary as "Run-time randomness". We designate this principle as "mini-entropy". In combination with the function of the program the resulting entropy in the produced random numbers is perfect, and these random numbers are completely different from all the others. The term mini-entropy comes from the fact that these time derived variables are only around 1/1700 of the random numbers produced.